#ifndef _USART_H_
#define _USART_H_

#define CMD_ADVANCE         0xA0
#define CMD_RECOIL          0xA1
#define CMD_TURN_LEFT       0xA2
#define CMD_TURN_RIGHT      0xA3
#define CMD_STOP            0xA4
#define CMD_ANOTHER_COMMAND 0xA5

// unsigned char wheel[7] = {
//     up_state,
//     down_state,
//     left_state,
//     right_state,
//     pink_state,
//     red_state,
// };

typedef struct{
    int x;
    int y;
    int s;
}SpitballCoordinates;



void Usart1_Init(void);
void Usart2_Init(void);
void Usart3_Init(void);

void Usart1_SendByte(uint8_t Byte);

uint8_t Serial_GetRxFlag(void);

uint8_t Usart1_GetRxData(void);
uint8_t Usart2_GetRxData(void);

int handle_serial_command();
int Robot_serial_command();

int parse_serial_command(void);
SpitballCoordinates Get_Spitball_Coordinates(void);

#endif
